/***************************************
 * 地址栏 相关
 ***************************************/
$.extend($app, {
	/**
	 * url传参  可传中文
	 **/
	getRequest: function(obj) {
		var urlStr = location.search,
			theRequest = '';
		var urlCutA = urlStr.split(obj)[1];
		if (!!urlCutA) {
			var urlCutB = urlCutA.split('=')[1];
			var urlCutC = urlCutB.split('&')[0]
			if (urlCutC) {
				theRequest = urlCutC;
			} else {
				theRequest = urlCutB;
			}
			theRequest = decodeURI(theRequest);
			return theRequest;
		} else {
			return;
		}
	},

	//获取完整地址栏最后一窜 地址
	getUrlEnd: function() {
		var urlStr = location.href;
		var text = '/';
		var xu = urlStr.lastIndexOf(text);
		
		var end = urlStr.indexOf($app.fileFormat);
		var pg = urlStr.substring(xu + text.length);
		var out = $app.delSuffix(pg);
		//console.log('得到地址栏最后一截 = ',out);
		return out;
	},

	//删掉后缀名
	delSuffix: function(text) {
		var xu = text.indexOf($app.fileFormat);
		var outText = text.substring(0, xu);
		var out = $app.judgeData(outText) ? outText : undefined;
		return out;
	}
});
